<?php
class Operate_power_log_model extends BZ_Model
{
    protected $table = 'operate_power_log';
    
    public function insert($params=array())
    {
        $data = array(
            'uid'     => $params['uid'],
            'name'    => !empty($params['name']) ? $params['name'] : '未知',
            'record'  => $params['record'],
            'content' => $params['content'],
        );
        $this->db->insert($this->table, $data);
        return $this->db->insert_id();
    }
}